﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="ViewRequisitionHistroy.aspx.cs" Inherits="PresentationLayer.ViewRequisitionHistroy" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
        
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div align="center">
         <h2>Requisition History</h2>
            
         <br />
         <br />
        <table class="table-condensed">

            <tr>
                <td class="auto-style1">
                    <asp:Label ID="Label2" runat="server" Text="From Date"></asp:Label>
                    </td>
                <td>
        <asp:TextBox ID="txtFromDate" runat="server" CssClass="form-control" Width="220px"></asp:TextBox>

        
                    </td>

                <td>
                    <asp:ImageButton ID="ImageButton1" runat="server" Height="18px" ImageUrl="~/Images/calendar.jpg" OnClick="ImageButton1_Click" Width="30px" />
                </td>
                <td>&nbsp;&nbsp;</td>
                <td class="auto-style2">
                    <asp:Label ID="Label3" runat="server"  Text="To Date" class="control-label"></asp:Label>
                    </td>
                <td>
                    <asp:TextBox ID="txtToDate" runat="server" CssClass="form-control" Width="220px"></asp:TextBox>
                     
                    </td>
                <td>
                    <asp:ImageButton ID="ImageButton2" runat="server" Height="18px" ImageUrl="~/Images/calendar.jpg" Width="26px" OnClick="ImageButton2_Click" />
                </td>
                
            </tr>
            <tr>
                <td>

                </td>
                <td>

        
                    <asp:Calendar ID="calFromDate" runat="server" BackColor="#FFFFCC" BorderColor="#FFCC66" BorderWidth="1px" DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt" ForeColor="#663399" Height="200px" OnSelectionChanged="CalFromDate_SelectionChanged" ShowGridLines="True" Width="220px">
                <DayHeaderStyle BackColor="#FFCC66" Font-Bold="True" Height="1px" />
                <NextPrevStyle Font-Size="9pt" ForeColor="#FFFFCC" />
                <OtherMonthDayStyle ForeColor="#CC9966" />
                <SelectedDayStyle BackColor="#CCCCFF" Font-Bold="True" />
                <SelectorStyle BackColor="#FFCC66" />
                <TitleStyle BackColor="#990000" Font-Bold="True" Font-Size="9pt" ForeColor="#FFFFCC" />
                <TodayDayStyle BackColor="#FFCC66" ForeColor="White" />
            </asp:Calendar>

                </td>
                <td>
                    
                </td>
                <td></td>
                <td>

                </td>
                 <td>
                     
                     <asp:Calendar ID="calToDate" runat="server" BackColor="#FFFFCC" BorderColor="#FFCC66" BorderWidth="1px" DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt" ForeColor="#663399" Height="200px" OnSelectionChanged="calToDate_SelectionChanged" ShowGridLines="True" Width="220px">
                <DayHeaderStyle BackColor="#FFCC66" Font-Bold="True" Height="1px" />
                <NextPrevStyle Font-Size="9pt" ForeColor="#FFFFCC" />
                <OtherMonthDayStyle ForeColor="#CC9966" />
                <SelectedDayStyle BackColor="#CCCCFF" Font-Bold="True" />
                <SelectorStyle BackColor="#FFCC66" />
                <TitleStyle BackColor="#990000" Font-Bold="True" Font-Size="9pt" ForeColor="#FFFFCC" />
                <TodayDayStyle BackColor="#FFCC66" ForeColor="White" />
            </asp:Calendar>
                    </td>
                <td>

                </td>
            </tr>
            <tr>
                <td class="auto-style1">
                    <asp:Label ID="lblEmpName" class="control-label" runat="server" Text="Employee Name"></asp:Label>
                    </td>
                <td>
                    <asp:DropDownList ID="ddlEmployee" runat="server" CssClass="form-control"></asp:DropDownList>
                </td>
                <td class="auto-style2">
                    
                </td>
                <td></td>
                <td></td>
                <td>
                    <asp:Button ID="Button1" runat="server" Text="Search" OnClick="Button1_Click" CssClass="btn-primary pull-right" />
                </td>
            </tr>
            <tr>
                <td class="auto-style1">
                    &nbsp;&nbsp;</td>
                <td class="auto-style2">
                    
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
        </table>
        
        <asp:GridView ID="dgvReqHistory" EmptyDataText="No Data" runat="server" AutoGenerateColumns="False" Width="653px" OnRowDataBound="dgvReqHistory_RowDataBound" CssClass="table table-hover table-striped table-bordered">
            <Columns>
                <asp:BoundField DataField="ReqID" HeaderText="Requested ID" />
                <asp:BoundField DataField="ReqDate" HeaderText="Requested Date" DataFormatString="{0:dd/MM/yyyy}" />
                <asp:BoundField DataField="ApprovalStatus" HeaderText="Status" />
                <asp:BoundField DataField="ApprovalDate" HeaderText="Approval Date" DataFormatString="{0:dd/MM/yyyy}" />
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:LinkButton ID="lbtnViewDetail" Text="View Detail" runat="server" OnCommand="lbtnViewDetail_Command" CommandArgument='<%#Eval("ReqID") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:LinkButton ID="lbtnDelete" Text="Delete" runat="server" OnCommand="lbtnDelete_Command" CommandArgument='<%#Eval("ReqID") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
         </asp:GridView>
         <br />
         <br />
                 <asp:GridView ID="dgvReqHistoryViewDetail" runat="server" AutoGenerateColumns="False" CssClass="table-condensed table-bordered" Width="383px">
             <Columns>
                 <asp:BoundField DataField="ItemName" HeaderText="Stationery Description" />
                 <asp:BoundField DataField="RequestQty" HeaderText="Quantity" />

                 <asp:BoundField DataField="ApprovalStatus" HeaderText="Status" />

             </Columns>
            </asp:GridView>
    </div><br />
</asp:Content>